#include <func.h>
#include <crypt.h>

int main(int argc, char ** argv)
{
    //选择yescript算法
    const char * prefix = "$y$";
    char * setting = crypt_gensalt(prefix, atoi(argv[1]), NULL, 0);
    printf("setting: %s\n", setting);
    char * encrypted = crypt(argv[2], setting);
    printf("encrypted: %s\n", encrypted);

    return 0;
}

